package io.netty.myExample.duyutian.byteBufAllocator;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.buffer.UnpooledByteBufAllocator;
import io.netty.channel.socket.nio.NioSocketChannel;

/**
 * @author duyutian
 * @version 1.0
 * @date 2020/6/19 14:57
 * 按需分配 byteBufAllocator 接口
 */
public class ByteBufAllocatorTest {

    public static void main(String[] args) {
        //申请空间
        //new UnpooledByteBufAllocator()
        ByteBuf buffer = Unpooled.buffer();

        NioSocketChannel channel = new NioSocketChannel();
        channel.alloc();


    }
}
